#ifndef CONTENTMODEL_H
#define CONTENTMODEL_H

#include "content/articlecontent.h"

#include <QObject>
#include <QAbstractListModel>
#include <QtQml/qqml.h>


class ContentModel : public QAbstractListModel
{
    Q_OBJECT
public:
    enum ContentRoles {
        ContentRole = Qt::UserRole + 1
        ,TypeRole
    };

    ContentModel(QObject *parent = 0);

    int rowCount(const QModelIndex & parent = QModelIndex()) const;
    QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;

public slots:

    void setContentArticle(const QList<TextData>& _contentItems);

protected:
    QHash<int, QByteArray> roleNames() const;

    QList<TextData> m_contentItems;

};

#endif // CONTENTMODEL_H
